<!doctype html>
<html>
	<head>
		<title>羽乐汇</title>
		<meta name="keywords" content="羽毛球，球会，球场，教练">
		<meta name="charset" content="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1" />
		<link rel="stylesheet" type="text/css" href="__PUBLIC__/CSS/HomePage/bootstrap.min.css">
		<!-- <link rel="stylesheet" type="text/css" href="__PUBLIC__/CSS/HomePage/wap_index.css"> -->
		<link rel="stylesheet" type="text/css" href="__PUBLIC__/CSS/HomePage/index.css">
		
		<script type="text/javascript" src="__PUBLIC__/JS/HomePage/jquery.min.js"></script>
		
		<script type="text/javascript" src="__PUBLIC__/JS/HomePage/bootstrap.min.js"></script>
		<script type="text/javascript" src="__PUBLIC__/JS/HomePage/md5.js"></script>
		<script type="text/javascript" src="__PUBLIC__/JS/query-object.js"></script>
		<script type="text/javascript" src="__PUBLIC__/JS/HomePage/yuleclub.js"></script>
		<script type="text/javascript" src="__PUBLIC__/JS/HomePage/index.js"></script>
    </head>
	<body>
	<!-- ---------------------------------------------------------------pc_index--------------------------------------------------------- -->
		<div class="pc_coach container-fluid">
			<div class="top visible-lg visible-md">
				<div class="ttop">
					<span>欢迎来到羽乐汇</span>
					<div>
						<span class="wellcome"></span>
						<span class="login">
							<button class="login_btn">登陆</button>
							<!-- <button class="notlogin_btn">注销</button> -->
							<a href="<{:U('Index/registration')}>">注册</a>
							
						</span>
						<!-- <button class="sign_btn">注册</button> -->
						<a class="login_after" href="<{:U('User/index')}>">个人主页</a>
						<a href="__PUBLIC__/HTML/vip_center.html">vip中心</a>
					</div>
				</div>
				<div>
					<img src="__PUBLIC__/PICTURE/HomePage/logo.jpg">
				</div>
				<div class="main_nav">
					<ul>
						<li><a href="<{:U('Index/index')}>">首页</a></li>
						<li><a href="<{:U('Gymnasium/index')}>">球场</a></li>
						<li><a href="<{:U('Club/index')}>">球会</a></li>
						<li>培训</li>
						<li><a href="<{:U('Activity/activity')}>">活动</a></li>
						<li><a href="<{:U('Coach/index')}>">教练</a></li>
						<li>竞赛</li>
						<li><a href="<{:U('Announce/index')}>">公告</a></li>
					</ul>
				</div>
			</div>
			<header class="row visible-xs visible-sm header_nav">
				<a href="<{:U('Club/index')}>"><img src="__PUBLIC__/PICTURE/HomePage/pre.png"/></a>
				<span>球会详情页面</span>
			</header>
			<div class="club_content">
				<div class="club_nav">
				
				</div>
				<div class="club_messege">
					<div class="alley alley_detail">
						<div id="img">
						</div>
						<div class="message">
							<ul>
								<li id="name"></li>
								<li id="introduction"></li>
								<li id="regist_time"></li>
								<li id="type"></li>
								<li id="detail"></li>
								<li><button class="join" type="button">加入球会</button></li>
							</ul>
						</div>	
					</div>
				</div>
			<!-- 	<div class="content_foot">
				</div> -->
			</div>
			</div>
			<div class="foot row">
				<div>
					<p>联系我们</p>
					<p>关于我们</p>
					<p>加入我们</p>
				</div>
				<div>
					<p>电话：400-800-8888 周一至周六9：00-18：00</p>
					<p>[羽乐汇]<a href="http://oto.my3w.com">http://oto.my3w.com</a></p>
				</div>
			</div>
		<script type="text/javascript">
		var club = [];
		var master = [];
		var clubId;
		var if_applied ;//是否已经加入
		var applyKind ;//加入类型
		var addResult ;
		//登陆验证
		var strCookie=document.cookie;
		var arrCookie=strCookie.split("; ");
		for(var i=0;i<arrCookie.length;i++){
             var arr=arrCookie[i].split("=");
             if("username"==arr[0]){
                    break;
             }
             else if(i ==arrCookie.length-1){
             	alert("请先登录");
             	window.location.href="<{:U('Login/userLogin')}>";
             }
		}
		<!------------------球会页面介绍------------------>
		master=<{$master_info}>;
		club=<{$club_info}>;
		clubId=club.id;
		function setpage(){
			var name=club.name;
			var club_number_count=club.club_number_count;
			var club_kind=club.club_kind;
			var regist_time=club.regist_time;
			var introduction=club.introduction;
			var club_picture=club.club_picture;
			$('#img').html('<img src="'+club_picture+'">');
			$('#name').html("球会名："+name);
			$('#introduction').html("球会简介："+club.introduction);
			$('#regist_time').html("球会建立时间："+regist_time);
			if(club_kind==0){
				$('#type').html("球会类型：松散型");
			}
			else{
				$('#type').html("球会类型：紧密型");
			}

		}
		setpage();
		<!------------------报名球会------------------>
		$('.join').bind('click',function(){
			$.post('__URL__/joinClub',{'club_id':clubId},function(resultList){
				if_applied=resultList.if_applied;
				applyKind=resultList.applyKind;
				addResult=resultList.addResult;
				if(if_applied == 1){
					alert("您已经是球会成员了");
				}
				else if(applyKind == 1){
					alert("您已提交申请");
				}
				else if(addResult == 1){
					alert("您已经成功加入该球会");
				}
				else{
					alert("加入失败");
				}
    	},'json');
		});
		</script>
	</body>
</html>